package demoMod.stsconsole.rooms;

import demoMod.stsconsole.chests.LargeChest;
import demoMod.stsconsole.chests.MediumChest;
import demoMod.stsconsole.chests.SmallChest;
import demoMod.stsconsole.dungeons.AbstractDungeon;
import demoMod.stsconsole.helpers.LocalizedStrings;

import java.util.List;

public class TreasureRoom extends AbstractRoom {
    @Override
    public void onPlayerEntry() {
        super.onPlayerEntry();
        this.phase = RoomPhase.COMPLETED;
        System.out.println(LocalizedStrings.getUIStrings("AbstractRoom").get(1));
        this.chest = AbstractDungeon.getRandomChest();
        List<String> uiStrings = LocalizedStrings.getUIStrings("AbstractRoom");
        int chestSize;
        if (this.chest instanceof SmallChest) {
            chestSize = 3;
        } else if (this.chest instanceof MediumChest) {
            chestSize = 4;
        } else if (this.chest instanceof LargeChest) {
            chestSize = 5;
        } else {
            chestSize = 6;
        }
        System.out.printf(uiStrings.get(2), uiStrings.get(chestSize));
    }

    @Override
    public String getRoomSymbol() {
        return "T";
    }
}
